package com.yuxl.common.core.domain.socket;

import com.alibaba.fastjson2.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.web.reactive.socket.WebSocketSession;

/**
 * @Author : yuxl
 * @create 2025/7/10 下午2:21
 */
@Accessors(chain = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ToMessage<T> {

    private String path;
    private T data;

    public String toString(){
        return JSONObject.toJSONString(this);
    }
}
